button: add a border param to gtk_button_get_props()
authorCosimo Cecchi <cosimoc@gnome.org>
Tue, 20 Dec 2011 11:28:47 +0000 (12:28 +0100)
committerCosimo Cecchi <cosimoc@gnome.org>
Tue, 20 Dec 2011 18:01:38 +0000 (19:01 +0100)
We'll use it later to compute the child offsets.

https://bugzilla.gnome.org/show_bug.cgi?id=666600

gtk/gtkbutton.c

index 080cbb7cd7d1da257e61afca86fd15b9513912f8..1e1ee17c11b10b72af04fb16d39503dc748a6b48 100644 (file)
@@ -1402,6 +1402,7 @@ gtk_button_get_props (GtkButton *button,
                      GtkBorder *default_outside_border,
                       GtkBorder *inner_border,
                       GtkBorder *padding,
+                      GtkBorder *border,
                      gboolean  *interior_focus)
 {
   GtkStyleContext *context;
@@ -1465,6 +1466,9 @@ gtk_button_get_props (GtkButton *button,
 
   if (padding)
     gtk_style_context_get_padding (context, state, padding);
+
+  if (border)
+    gtk_style_context_get_border (context, state, border);
 }
 
 static void
@@ -1484,7 +1488,7 @@ gtk_button_size_allocate (GtkWidget     *widget,
 
   context = gtk_widget_get_style_context (widget);
 
-  gtk_button_get_props (button, &default_border, NULL, &inner_border, &padding, NULL);
+  gtk_button_get_props (button, &default_border, NULL, &inner_border, &padding, NULL, NULL);
   gtk_style_context_get_style (context,
                               "focus-line-width", &focus_width,
                               "focus-padding", &focus_pad,
@@ -1577,7 +1581,7 @@ _gtk_button_paint (GtkButton          *button,
 
   gtk_style_context_save (context);
 
-  gtk_button_get_props (button, &default_border, &default_outside_border, NULL, NULL, &interior_focus);
+  gtk_button_get_props (button, &default_border, &default_outside_border, NULL, NULL, NULL, &interior_focus);
   gtk_style_context_get_style (context,
                                "focus-line-width", &focus_width,
                                "focus-padding", &focus_pad,
@@ -1932,7 +1936,7 @@ gtk_button_get_size (GtkWidget      *widget,
 
   context = gtk_widget_get_style_context (widget);
 
-  gtk_button_get_props (button, &default_border, NULL, &inner_border, &padding, NULL);
+  gtk_button_get_props (button, &default_border, NULL, &inner_border, &padding, NULL, NULL);
   gtk_style_context_get_style (context,
                                "focus-line-width", &focus_width,
                                "focus-padding", &focus_pad,